#ifndef VIDEO_H
#define VIDEO_H

#include <QWidget>
#include <QMainWindow>
#include<QPixmap>
#include <QLabel>
#include <QWidget>
#include <QVBoxLayout>
#include <QMediaPlayer>
#include <QVideoWidget>
#include <QMediaPlaylist>
#include <QFileDialog>
#include <QString>
#include <QMediaContent>
#include <QDateTime>
#include <QMenuBar>
#include <QMediaMetaData>


namespace Ui {
class video;
}

class video : public QWidget
{
    Q_OBJECT

public:
    explicit video(QWidget *parent = 0);
    ~video();
    QMediaPlayer *player;
    QVideoWidget *videoWidget;
    QMediaPlaylist *medialist;
    QFileDialog *Filedialog;
    QMediaContent *mediacontent;
    QMenuBar* menubar;
    qint64 m_currentPosition;
    qint64 m_duration;
//    QString get_video_info(QString filename);

public slots:
    void starvideo();
    void pausevideo();
    void closevideo();
//    void resumevideo();
    void insertvideo();
    void updateDuration(qint64 m_duration);
    void updatePosition(qint64 m_currentPosition);
    void setVideoUrl(QString url);
    void closeEvent(QCloseEvent *event);
signals:

private slots:
    void on_video_time_valueChanged(int value);

private:
    Ui::video *ui;
};

#endif // VIDEO_H
